package semaphores;

import train.Train;

public abstract class Semaphore {
	protected State etatSemaphore;
 
	// normally only called by classes implementing the State interface
	public void setState(State stateName) { 
		this.etatSemaphore = stateName;
	}
	
	public void actionOnTrain(Train unTrain) {
		this.etatSemaphore.actionOnTrain(unTrain);
	}
	
	public String toString() {
		return this.etatSemaphore.toString();
	}
	
}
